package com.ckf.mall.controller;


import com.ckf.mall.entity.UserAddress;
import com.ckf.mall.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OrderController {

    @Autowired
    private OrdersService ordersService;

    @GetMapping("/initOrder")
    public List<UserAddress> initOrder(String userId){
        return ordersService.initOrder(userId);
    }
}
